<template>

  <div class="header-container">
<!--    <h1>this is header</h1>-->
    <div class="l-content">
      <el-button icon="el-icon-menu" size="mini" @click="changeCollapse"></el-button>
      <!-- 面包屑     -->
      <span class="text">
          首页
      </span>
    </div>
    <div class="r-content">
      <el-dropdown>
        <span class="el-dropdown-link">
          <img class="user-icon" src="../assets/images/user-default.png">
        </span>

        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item>个人中心</el-dropdown-item>
          <el-dropdown-item>退出</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>
  </div>
</template>

<script>

export default {
  methods:{
    changeCollapse(){
        /*修改左侧导航栏组件的属性*/
        console.log("点击按钮")
      this.$store.commit("collapseMenu")
    }
  }
}
</script>

<!--使用less-->
<style lang="less">
.header-container {
  background-color: #333;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  .text{
    color: white;
    font-size: 14px;
    margin-left: 10px;
  }
  .r-content{
      .user-icon{
        width: 40px;
        height: 40px;
        border-radius: 50%;
      }
  }
}
</style>